<template>
  <div>
    <vue-ueditor-wrap ref="editor" v-model="content"
                      editor-id="editor"
                      :config="editorConfig"
                      :editorDependencies="['ueditor.config.js','ueditor.all.js','xiumi/xiumi-ue-dialog-v5.js']"
                      @ready="ready"
                     />
  </div>
</template>
<script>
import VueUeditorWrap from 'vue-ueditor-wrap'

export default {
  components: {
    VueUeditorWrap
  },
  data() {
    return {
      content: '',
      editorConfig: {
        // 后端服务地址，后端处理参考
        // https://open-doc.modstart.com/ueditor-plus/backend.html
        serverUrl: '/api/path/to/server',
        UEDITOR_HOME_URL: `${location.origin}/UEditorPlus/`,
        toolbars: [['bold',"italic",'forecolor','fontsize','xiumi']]
      }
    }
  },
  methods:{
    ready(editor){
      editor.execCommand( 'fontsize', '14px' );
    }
  }
}
</script>